/*
 * CSVDataSource.js
 * Example using a data source
 *  
 *  
*/

response.setContentType("text/html");

var ds = data.getDataSource("CSVDataSource");

var result = ds.doQuery();

var buffer = "<table border=1>";
for (var i=0; i< result.size(); i++) {
	buffer += "<tr>";
	var record = result.get(i);
	var values = record.values.toArray();
	
	
	for (j in values) {
		buffer += "<td>" + values[j] + "</td>";
	}
	
	
	buffer += "</tr>";
	
}
buffer += "</table>";


buffer;